package org.restorator.dao.implement.engin;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.restorator.dao.jdbc.RowMapper;
import org.restorator.entity.User;
import org.restorator.entity.Roles;

public class UserRowMapper implements RowMapper<User>{

	@Override
	public User mapRow(ResultSet rs, int rowCount) throws SQLException {
		User user = new User();
		user.setUserId(rs.getInt(1));
		user.setName(rs.getString(2));
		user.setSurname(rs.getString(3));
		user.setLogin(rs.getString(5));
		user.setPassword(rs.getString(6));
		user.setPhone(rs.getString(4));
        user.setKey(rs.getString(7));
        user.setLlt(rs.getString(8));
		user.setRoleId(rs.getInt(9));
		return user;
	}
}
